package com.zonski.jbots.engine;

public final class CollisionData
{
    /**
     * the x position of the colliding entity on colliding
     */
    public int x;
    
    /**
     * the y position of the colliding entity on colliding
     */
    public int y;

    /**
     * length of the collision on the edge
     */
    public int length;

    /**
     * the other entity involved in this collision
     */
    public Entity with;

    /**
     * the edge of the bounds that the collision occured on
     * <tt>
     * +--N--+
     * |     |
     * W     E
     * |     |
     * +--S--+
     * </tt>
     */
    public int edge;

    /**
     * The cost of the collision in terms of steps 
     */
    public int cost;

    public CollisionData(Entity with, int x, int y, int edge, int cost, int length)
    {
        this.x = x;
        this.y = y;
        this.edge = edge;
        this.with = with;
        this.cost = cost;
        this.length = length;
    }

    public final void setData(Entity with, int x, int y, int edge, int cost, int length)
    {
        this.x = x;
        this.y = y;
        this.edge = edge;
        this.with = with;
        this.cost = cost;
        this.length = length;
    }
}
